App.require(function () {
    var app = App.getCurrent();

    app.definePage("viewer", {
        render: function (next) {
            this.fetch("./index.html", function (text) {
                next(this.renderHTML(text));
            })
        },
        getDomObj: function () {
            this.attachDom("#viewer", "viewer");
        },
        init: function () {
            this.fetch("/public/scene.json", function (json) {
                var obj = JSON.parse(json);
                console.log(obj);
                this.domList.sceneViewer = App.Viewer.from(this.domList.viewer, obj, app.wm, app.wbm);
            })
        }
    })
})